{extend name="public:_base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/uploadify/uploadify.css">
{/block}
{block name="js"}
{include file="public/_validform"}
<!--上传配置 -->
<script src="__STATIC__/admin/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/upfile.js" type="text/javascript"></script>
<script type="text/javascript">
    $("[name='status'][value='{$data.status ?? ''}']").attr("checked", true);
    $("[name='type'][value='{$data.type ?? ''}']").attr("checked", true);
    $("[name='position']").find("[value='{$data.position ?? ''}']").attr("selected", true);

    upload_image('image','','200','200');
    var URL = {
        uploader: '{:url('Upload/image')}',
        swf:'__STATIC__/admin/uploadify/uploadify.swf',
        ROOT:'__PUBLIC__/uploads/image',
    }
</script>
{/block}
{block name="main"}
<div class="page-container">

    <form action="{:url(\''.\\think\\Request::instance()->controller().'/save')}" method="post" class="form form-horizontal" id="form">
        
        <table class="table table-border table-bordered table-bg table-style">
            <thead>
                <tr>
                    <th colspan="2" scope="col">填写信息</th>
                </tr>
            </thead>
            
            <tbody>
                <tr>
                    <th>
                        <span class="c-red">*</span>用户：
                    </th>
                    <td>
                        {empty name="data.name"}
                        <input type="text" class="input-text" value="{$data.name ?? ''}" placeholder="" datatype="*" name="name">
                        {/empty}
                        {$data.name ?? ''}
                    </td>
                </tr>
                
                <tr>
                    <th>
                        <span class="c-red">*</span>电话：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="{$data.mobile ?? ''}" placeholder="" datatype="*" name="mobile">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        <span class="c-red">*</span>头像：
                    </th>
                    <td>
                        <div id="image_s">
                            <img src="__PUBLIC__/uploads/{$data.image ?'image/'.$data.image: 'sm_avatar.png'}" width="200px" height="200px" />
                        </div>
                        <input id="image_post" name="image" type="hidden" value="{$data.image ?? ''}"/>
                        <input name="old_image" type="hidden" value="{$data.image ?? ''}"/>
                        <input id="image" name="image_upload" type="file" multiple="true">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        <span class="c-red">*</span>QQ：
                    </th>
                    <td>
                        <input type="number" class="input-text" value="{$data.QQ ?? ''}" placeholder="" datatype="*" name="QQ">
                        {notempty name="$data.QQ"}
                        <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin={$data.QQ}&site=qq&menu=yes">
                            <img border="0" src="http://wpa.qq.com/pa?p=2:{$data.QQ}:51" alt="点击这里给我发消息" title="点击这里给我发消息"/>
                        </a>
                        {/notempty}
                    </td>
                </tr>
                
                <!--<tr>-->
                    <!--<th>-->
                        <!--邮箱：-->
                    <!--</th>-->
                    <!--<td>-->
                        <!--{notempty name="$data.ismail"}-->
                        <!--<input type="email" class="input-text" value="{$data.mail ?? ''}" readonly name="mail" >-->
                        <!--<a class="label label-success radius">已审核</a>-->
                        <!--{else/}-->
                        <!--<input type="email" class="input-text" value="{$data.mail ?? ''}" placeholder="格式：admin@admin.com" name="mail" >-->
                        <!--{/notempty}-->
                    <!--</td>-->
                <!--</tr>-->
                <tr>
                    <th>
                        类型：
                    </th>
                    <td>
                        <div class="radio-box">
                            <input type="radio" name="type"  value="0">
                            <label for="radio-0">学员</label>
                        </div>

                        <div class="radio-box radio-right">
                            <input type="radio" name="type" value="1">
                            <label for="radio-1">领导</label>
                        </div>
                    </td>
                </tr>

                <tr>
                    <th>
                        首页位置显示：
                    </th>
                    <td>
                        <select name="position">
                            <option value="">--请选择--</option>
                            {volist name=":config('nav.user_postion')" id="vo"}
                            <option value="{$key}">{$vo}</option>
                            {/volist}
                        </select>
                        <br>
                        首页位置显示：相同的位置只显示第一个，并且只有类型为领导的才有效
                    </td>
                </tr>
                
                <tr>
                    <th>
                        介绍：
                    </th>
                    <td>
                        <textarea type="text" cols="10" class="input-text" name="jieshao" style="width:100%;height:120px">{$data.jieshao ?? ''}</textarea>
                    </td>
                </tr>

                <tr>
                    <th>
                        审核：
                    </th>
                    <td class="textarea-examine">
                        <textarea type="text" cols="10" class="input-text" name="error" placeholder="审核不通过原因" style="width:100%;height:120px">{$data.error ?? ''}</textarea>

                        <div class="radio-box">
                            <input type="radio" name="status" id="radio-0" value="1">
                            <label for="radio-0">通过</label>
                        </div>

                        <div class="radio-box radio-right">
                            <input type="radio" name="status" id="radio-1" value="2">
                            <label for="radio-1">不通过</label>
                        </div>
                    </td>
                </tr>

                <tr>
                    <th></th>
                    <td>
                        <span class="c-red">* 密码修改（不修改请留空）</span>
                    </td>
                </tr>
                
                <tr>
                    <th>
                        密码：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="" placeholder="" name="password">
                    </td>
                </tr>
                
                <tr>
                    <th>
                        确认密码：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="" placeholder="" name="password_confirm">
                    </td>
                </tr>
            </tbody>
            
            <tfoot>
                <tr>
                    <th></th>
                    <td>
                        {:token()}

                        <input name="id" value="{$data.id ?? ''}" type="hidden" />
                        <input class="btn radius btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                        <input class="btn radius btn-default radius" type="reset" value="&nbsp;&nbsp;重置&nbsp;&nbsp;">
                        <!-- <button onClick="layer_close();" class="btn radius btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button> -->
                    </td>
                </tr>
            </tfoot>
            
        </table>

    </form>
</div>
{/block}
